package cn.szzsi.common.model;

import cn.szzsi.common.model.base.BaseOperateLogs;

import java.util.Date;

/**
 * Created by yuanzheng on 2016/12/6.
 */
//@TableBind(tableName = "b_operate_logs", pkName = "id")
public class OperateLogs extends BaseOperateLogs<OperateLogs> {
    public static final OperateLogs dao =new OperateLogs().dao();

    public void  saveLog(String memberId, String username, String record, String uid, String type){
        OperateLogs operateLog=new OperateLogs();
        operateLog.set("memberId",memberId);
        operateLog.set("username",username);
        operateLog.set("record",record);
        operateLog.set("uid",uid);
        operateLog.set("type",type);
        operateLog.set("createDate",new Date());
        operateLog.save();
    }

    public Member getMemberById(){
        return Member.dao.findById(getStr("memberId"));
    }

}
